package com.leal.util

import java.util.ResourceBundle

/**
 * 配置类
 */
object UserConfig {

  // kafka 相关
  val KAFKA_BOOTSTRAP_SERVERS: String = "kafka.bootstrap-servers"
  // redis 相关
  val REDIS_HOST: String = "redis.host"
  val REDIS_PORT: String = "redis.port"
  val REDIS_PASSWORD:String="redis.password"

  // es 相关
  val ES_HOST: String = "es.host"
  val ES_PORT: String = "es.port"

  private val bundle: ResourceBundle = ResourceBundle.getBundle("config")

  def apply(propsKey: String): String = {
    bundle.getString(propsKey)
  }
}
